<template>
  <breadCrumb :data="data"></breadCrumb>
  <router-view></router-view>
</template>


<script setup>
import {ref,onMounted, getCurrentInstance} from "vue"
import bus from "./utils/bus";

let data = ref([])

onMounted(()=>{


  console.log(getCurrentInstance())

  let instance = getCurrentInstance()  // 获取组件实例

  //   // 获取app全局添加的属性
  let $bus = instance.appContext.config.globalProperties.bus;

  $bus.$on('breadChange',input => {
    data.value = input
  })

})




</script>


